{% extends 'base.html' %}

{% block js %}
{{ block.super }}
<script> var connection_params = { 'host':'{{ connection_params.host }}', 'port': '{{ connection_params.port }}', 'db' : null, 'coll': null }; </script>
<script src="/static/fom/js/fangofmongo_utils.js"></script>
<script src="/static/fom/js/fangofmongo_ui.js"></script>

<script src="/static/fom/js/fom_about.js"></script>
<script src="/static/fom/js/mongo_collection.js"></script>
<script src="/static/fom/js/mongo_colllist.js"></script>
<script src="/static/fom/js/mongo_dblist.js"></script>

<script> try { fom_init_mongo_ui(); } catch(e) { alert(e); };  </script>
{% endblock %}



{% block css %}
{{ block.super }}
<link rel=stylesheet href="/static/fom/css/fangofmongo_ui.css" type="text/css"/>
<link rel=stylesheet href="/static/fom/css/fom_about.css" type="text/css"/>
<link rel=stylesheet href="/static/fom/css/mongo_collection.css" type="text/css"/>
{% endblock %}

{% block header %}
{{ block.super }}

<div id="mongo_ui_header">

<span id="mongo_ui_header_name">Fang of Mongo</span> <span id="mongo_ui_header_db_info">Server info:
  {% if build_info %}
    {% templatetag openbrace %} version: {{ build_info.version }}, bits: {{ build_info.bits }} {% templatetag closebrace %}
  {% endif %}
  <a href="#" id="mongo_ui_about_btn">About FoM</a>
</span>
</div>
<span id="mongo_ui_header_tools">
    <span id="mongo_ui_header_tools_bus"></span>
    <span id="fom_utils"></span>
    <!--<span id="mongo_ui_header_tools_console">
        Console window
    </span>-->

</span>
<div id="mongo_ui_menu"></div>
<div id="errors"></div>
{% endblock header %}


{% block content %}
{{ block.super }}
<!-- mongo_ui_container -->
<div id="mongo_ui_container">
  <div id='mongo_ui_lists'>
    <h2>Database</h2>
    <div id='mongo_ui_database_list'></div>
    <h2>Collection</h2>
    <div id='mongo_ui_collection_list'></div>
  </div>
 {% include 'mongo_collection.html' %}
 {% include 'fom_about.html' %}
</div>
{% endblock content %}
